package com.zhang.service.impl;

import com.zhang.mapper.ITypeMapper;
import com.zhang.pojo.TypeBean;
import com.zhang.service.ITypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class TypeServiceImpl implements ITypeService {

    @Autowired
    private ITypeMapper typeMapper;

    @Override
    public List<TypeBean> findAll() {
        return typeMapper.selectList(null);
    }

    @Override
    public TypeBean findById(int id) {
        return typeMapper.selectById(id);
    }
}
